Skip to content

Conversation

@ernestognw
Copy link
Member

@ernestognw ernestognw commented Nov 10, 2025

Adds bytes4 functions to EnumerableSet and EnumerableMap. The rationale is that bytes4 is common for function selectors

PR Checklist

  • Tests
  • Documentation
  • Changeset entry (run npx changeset add)

@ernestognw ernestognw requested a review from a team as a code owner November 10, 2025 18:45
@changeset-bot
Copy link

changeset-bot bot commented Nov 10, 2025

🦋 Changeset detected

Latest commit: fbc13ec

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
openzeppelin-solidity Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 10, 2025

Walkthrough

This pull request introduces a minor version bump for openzeppelin-solidity and expands the EnumerableMap and EnumerableSet utilities with support for new type combinations. Six new map types are added to EnumerableMap (UintToBytes4Map, AddressToBytes4Map, Bytes4ToUintMap, Bytes4ToAddressMap, Bytes4ToBytes4Map, and Bytes4ToBytes32Map), each providing standard CRUD and query operations. A Bytes4Set type is introduced to EnumerableSet, mirroring existing set patterns. Supporting changes include updates to generation templates and test helper utilities to accommodate the bytes4 type.

Suggested labels

release-cycle

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main objective of the changeset: adding enumerable data structures (EnumerableSet and EnumerableMap) that support bytes4 types.
Description check ✅ Passed The PR description clearly relates to the changeset, explaining the rationale for adding bytes4 support to EnumerableSet and EnumerableMap for function selectors.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@ernestognw ernestognw mentioned this pull request Nov 10, 2025
3 tasks
@ernestognw ernestognw added this to the 5.6 milestone Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant